Fix ert-font-lock macro signatures
authorBasil L. Contovounesios <basil@contovou.net>
Thu, 20 Feb 2025 09:29:54 +0000 (10:29 +0100)
committerBasil L. Contovounesios <basil@contovou.net>
Tue, 25 Feb 2025 10:02:55 +0000 (11:02 +0100)
commit02c830ba22b0564f6725cd403beba4accb836061
treeb7e74c0a1b57b0b2c9d4eaab61766a6cde91b249
parent0c6b8643aec24935f82c63d43219f26378e3e578
Fix ert-font-lock macro signatures

* doc/misc/ert.texi (Syntax Highlighting Tests):
* test/lisp/emacs-lisp/ert-font-lock-tests.el
(test-line-comment-p--emacs-lisp, test-line-comment-p--shell-script)
(test-line-comment-p--javascript, test-line-comment-p--python)
(test-line-comment-p--c, test-macro-test--correct-highlighting)
(test-macro-test--docstring, test-macro-test--failing)
(test-macro-test--file, test-macro-test--file-no-asserts)
(test-macro-test--file-failing): Reindent macro calls.
(with-temp-buffer-str-mode): Evaluate macro arguments left-to-right.
(ert-font-lock--wrap-begin-end): Use rx for more robust composition.
(test-line-comment-p--php): Require that php-mode is callable, not
already loaded.

* lisp/emacs-lisp/ert-font-lock.el (ert-font-lock-deftest)
(ert-font-lock-deftest-file): NAME is not followed by an empty list
like in ert-deftest, so the optional DOCSTRING is actually the
second argument.  Adapt calling convention in docstring, and debug,
doc-string, and indent properties accordingly (bug#76372).  Fix
docstring grammar, document MAJOR-MODE, and avoid referring to a
file name as a path.
doc/misc/ert.texi
lisp/emacs-lisp/ert-font-lock.el
test/lisp/emacs-lisp/ert-font-lock-tests.el